# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-whelk
pkgver=3.0
pkgrel=4
pkgdesc="Easy access to shell commands from python"
arch=('any')
license=('custom:zlib')
url="https://pypi.python.org/pypi/whelk"
depends=('python')
makedepends=('python-setuptools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/seveas/whelk/archive/$pkgver.tar.gz")
sha512sums=('7760e342b09a03951848d7c5ce258b43b44b6deda3efdb0433bd4704ebb8bd0e43589000e0e8916c2469ac154e0121292b79880fc09e5d44202117900ae7fb69')

build() {
  cd whelk-$pkgver
  python setup.py build
}

check() {
  cd whelk-$pkgver
  python -munittest discover
}

package() {
  cd whelk-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
